package com.ruoyi.publish.service.impl;

import com.ruoyi.publish.domain.RecommendColumn;
import com.ruoyi.publish.mapper.RecommendColumnMapper;
import com.ruoyi.publish.service.RecommendColumnService;
import net.sf.jsqlparser.schema.Column;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RecommendColumnServiceImpl implements RecommendColumnService {
    @Autowired
    private RecommendColumnMapper recommendColumnMapper;

    @Override
    public List<RecommendColumn> selectRecommend(RecommendColumn recommendColumn) {
        return recommendColumnMapper.selectRecommend(recommendColumn);
    }

    @Override
    public int insert(RecommendColumn recommendColumn) {
        return recommendColumnMapper.insert(recommendColumn);
    }

    @Override
    public int update(RecommendColumn recommendColumn) {
        return recommendColumnMapper.update(recommendColumn);
    }

    @Override
    public int deleteById(Long recommendId) {
        return recommendColumnMapper.deleteById(recommendId);
    }

    @Override
    public List<RecommendColumn> selectChildColumn(Long parentId) {
        return recommendColumnMapper.selectChildColumn(parentId);
    }
    @Override
    public List<Column> selectAvailableSecondLevelColumns(Long parentId) {
        return recommendColumnMapper.selectAvailableSecondLevelColumns(parentId);
    }

    @Override
    public List<Map<String, Object>> selectColumnName() {
        return recommendColumnMapper.selectColumnName();
    }
}
